package com.mygdx.game.stage;

import com.badlogic.gdx.utils.viewport.Viewport;
import com.mygdx.game.MainGame;
import com.mygdx.game.group.GameOverGroup;
import com.mygdx.game.stage.base.BaseStage;


public class GameOverStage extends BaseStage {

    private GameOverGroup gameOverGroup;

    public GameOverStage(MainGame game, Viewport viewport) {
        super(game, viewport);
        init();
    }

    public void init(){
        gameOverGroup = new GameOverGroup(getMainGame());
        gameOverGroup.setPosition(getMainGame().getWorldWidth()/2-gameOverGroup.getWidth()/2,
                getMainGame().getWorldHeight()/5*2);
        addActor(gameOverGroup);
    }

    public void setScore(int score){
        gameOverGroup.setScore(score);
    }
}
